<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<body>
<table width="200" border="1">
    <tr>
        <th scope="col">ID</th>
        <th scope="col">姓名</th>
        <th scope="col">密码</th>
    </tr>
    <c:forEach begin="0" step="1" items="${userList}" var="list" varStatus="userlist">
        <tr>
            <td>${list.id}</td>
            <td>${list.username}</td>
            <td>${list.password}</td>
        </tr>
    </c:forEach>
</table>
<%----%>
<p>一共${page.pages}页</p>
<a href="userList.action?page=1">第一页</a>
<a href="userList.action?page=
<c:if test="${page.prePage == 0}">1</c:if>
<c:if test="${page.prePage != 0}">${page.prePage}</c:if>">上一页</a>
<a href="userList.action?page=
<c:if test="${page.nextPage == 0}">${page.pages}</c:if>
<c:if test="${page.nextPage != 0}">${page.nextPage}</c:if>">下一页</a>
<a href="userList.action?page=${page.pages}">最后页</a>
</body>
</html>
